import { defHttp } from '/@/utils/http/axios';

enum Api {
  status = '/log/status',
  open = '/log/open',
  close = '/log/close',
  list = '/monitor/dashboard',
  save = '/monitor/add',
  delete = '/monitor/delete',
}
/**
 * 获取日志状态
 * @param params
 */
export const getStatus = (params) => {
  return defHttp.post({ url: Api.status, params });
};
/**
 * 开启日志状态
 * @param params
 */
export const openStatus = (params) => {
  return defHttp.post({ url: Api.open, params });
};
/**
 * 关闭日志状态
 * @param params
 */
export const closeStatus = (params) => {
  return defHttp.post({ url: Api.close, params });
};
/**
 * 列表
 * @param params
 */
export const list = (params) => {
  return defHttp.get({ url: Api.list, params });
};
/**
 * 删除
 * @param params
 */
export const deleteRequest = (params) => {
  return defHttp.post({ url: Api.delete, params });
};
/**
 * 保存
 * @param params
 */
export const saveOrUpdate = (params) => {
  return defHttp.post({ url: Api.save, params });
};
